package 其他文档;

import java.util.Scanner;

public class EducationalSystem {

    String isContinue= "N";
    public void startRun() {
        do {
            SystemMenu.printLoginAndRegisterMenu();
            Scanner sc = new Scanner(System.in);
            int userSelect = sc.nextInt();
            switch (userSelect) {
                case 1 -> {
                    System.out.println("欢迎使用登录功能");
                }
                case 2 -> {
                    System.out.println("欢迎使用注册功能");
                }
                case 3 -> {
                    System.out.println("是否退出（Y|N）");
                    String confirm = sc.next();
                    if (confirm.equalsIgnoreCase("y")) {

                        System.exit(0);
                    }

                }
                default -> {
                    System.out.println("您的选择有误，请重试");
                }
            }
            System.out.println("是否进行操作本系统（Y|N）");
            isContinue=sc.next();
        } while(isContinue.equalsIgnoreCase("y")) ;
        System.out.println("Bye!");
    }
}

